import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import { AtGrid, AtButton } from "taro-ui"
import {$navigateTo, $redirectTo} from '../../global'

export default class Index extends Component {

  config = {
    navigationBarTitleText: '首页'
  }

  componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }

  go=(url)=>{
    $navigateTo(url);
  }

  render () {
    return (
      <View className='index'>
        <View style='margin-bottom:50rpx;margin-top:50rpx;'><AtButton type='primary' onClick={this.go.bind(this, '../doctorpages/homepage/homepage')}>医生端</AtButton></View>
        <View><AtButton type='primary' onClick={this.go.bind(this, '../patientpages/huanzheshouye/huanzheshouye')}>患者端</AtButton></View>
      </View>
    )
  }
}

